home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 23
/
Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso
/
Aminet
/
disk
/
misc
/
TransADF.lha
/
Source
/
util.h
< prev
next >
Wrap
C/C++ Source or Header
|
1997-12-06
|
2KB
|
67 lines
#ifndef TRANSADF_UTIL_H
#define TRANSADF_UTIL_H
/*------------------------------------*/
/* Miscellaneous functions and macros */
/*------------------------------------*/
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif /* EXEC_TYPES_H */
#ifndef DOS_DOS_H
#include <dos/dos.h>
#endif /* DOS_DOS_H */
#ifndef CLIB_EXEC_PROTOS_H
#include <clib/exec_protos.h>
#endif /* CLIB_EXEC_PROTOS_H */
#ifndef CLIB_DOS_PROTOS_H
#include <clib/dos_protos.h>
#endif /* CLIB_DOS_PROTOS_H */
/*---------------*/
/* Useful Macros */
/*---------------*/
/* Output the track and side of (ULONG) tr to (BPTR) f. */
#define FPUTS_TS(tr,f) FPrintf ((f),"track %ld side %ld",((tr)>>1),((tr)&1))
/* Check to see if Control-C has been pressed */
#define CTRL_C (SetSignal(NULL,NULL) & SIGBREAKF_CTRL_C)
/* File types as returned by getFileType() */
#define FT_UNKNOWN 0 /* Default file type. */
#define FT_DOS 1 /* AmigaDOS disk. */
#define FT_ZLIB 2 /* ZLib stream (as defined in RFC-1950). */
#define FT_GZIP 3 /* GZip file (as defined in RFC-1952). */
#define FT_PKZIP 4 /* 'Standard' Zip as used by PK- and Info-Zip. */
#define FT_PKZIP_ADD 5 /* Add a new file to a PKZip archive. */
/*---------------------*/
/* Function prototypes */
/*---------------------*/
LONG Name2Unit (STRPTR devName);
#ifndef COMPILE_LITE
ULONG getFileType (BPTR file);
BOOL writeHead (BPTR outFile, STRPTR origName, ULONG fileType);
BOOL finishFile (BPTR outFile, ULONG CRC, ULONG CSize, ULONG USize,
ULONG fileType);
BOOL skipHead (BPTR inFile, STRPTR origName, ULONG fileType);
BOOL readTail (BPTR inFile, ULONG *CRC, ULONG *USize, ULONG fileType);
ULONG unixDate (void);
ULONG dosDate (void);
UWORD LES (UWORD num);
ULONG LEL (ULONG num);
#endif /* COMPILE_LITE */
#endif /* TRANSADF_UTIL_H */